﻿using System;
using System.Web.UI;
using UDS.Components;

namespace UDS.SubModule.UnitiveDocument.Setup
{
    /// <summary>
    /// Setup 的摘要说明。
    /// </summary>
    public partial class SetupPage : Page
    {
        public int ClassID;

        protected override void OnLoad(EventArgs e)
        {
            //判断用户权限以正确出现相应界面
            ClassID = Convert.ToInt32(Request.QueryString["classID"]);
            string userName = SiteContext.Current.UserName;

            //检查用户是否有部门管理的权限
            position_set.Visible = AssignRights.IsAccessAllowed(userName, ClassID, PermissionType.ManagePositionAndBBS);
            
            //检查用户是否有角色管理的权限
            role_set.Visible = AssignRights.IsAccessAllowed(userName, ClassID, PermissionType.ManageSysBulletin);

            base.OnLoad(e);
        }
    }
}